/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.jm.financeiro.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.Size;

/**
 *
 * @author joao
 */
@Entity
@Table(name = "proposta_procuracao", catalog = "salao", schema = "public")
@NamedQueries({
    @NamedQuery(name = "PropostaProcuracao.findAll", query = "SELECT p FROM PropostaProcuracao p")})
public class PropostaProcuracao implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "proposta_procuracao_id_procuracao_seq")
    @SequenceGenerator(name = "proposta_procuracao_id_procuracao_seq", sequenceName = "proposta_procuracao_id_procuracao_seq", initialValue = 1, allocationSize = 1)
    @Basic(optional = false)
    @Column(name = "id_procuracao", nullable = false)
    private Integer idProcuracao;
    @Size(max = 50)
    @Column(name = "dsc_procuracao", length = 50)
    private String dscProcuracao;
    //@Pattern(regexp="[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", message="Invalid procuracao")//if the field contains procuracao address consider using this annotation to enforce field validation
    //@Size(max = 2147483647)
    @Column(name = "procuracao", columnDefinition="text")
    private String procuracao;
    
    public PropostaProcuracao() {
    }

    public PropostaProcuracao(Integer idProcuracao) {
        this.idProcuracao = idProcuracao;
    }

    public Integer getIdProcuracao() {
        return idProcuracao; 
    }

    public void setIdProcuracao(Integer idProcuracao) {
        this.idProcuracao = idProcuracao;
    }

    public String getDscProcuracao() {
        return dscProcuracao;
    }

    public void setDscProcuracao(String dscProcuracao) {
        this.dscProcuracao = dscProcuracao;
    }

    public String getProcuracao() {
        return procuracao;
    }

    public void setProcuracao(String procuracao) {
        this.procuracao = procuracao;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idProcuracao != null ? idProcuracao.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PropostaProcuracao)) {
            return false;
        }
        PropostaProcuracao other = (PropostaProcuracao) object;
        if ((this.idProcuracao == null && other.idProcuracao != null) || (this.idProcuracao != null && !this.idProcuracao.equals(other.idProcuracao))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.jm.financeiro.entity.PropostaProcuracao[ idProcuracao=" + idProcuracao + " ]";
    }
    
}
